home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_emacs.idb / usr / freeware / info / emacs-7.z / emacs-7
Encoding:
GNU Info File  |  1998-10-28  |  48.2 KB  |  1,090 lines

  1. This is Info file ../info/emacs, produced by Makeinfo-1.63 from the
  2. input file emacs.texi.
  3.  
  4. 
  5. File: emacs,  Node: Backup,  Next: Interlocking,  Up: Saving
  6.  
  7. Backup Files
  8. ------------
  9.  
  10.    On most operating systems, rewriting a file automatically destroys
  11. all record of what the file used to contain.  Thus, saving a file from
  12. Emacs throws away the old contents of the file--or it would, except that
  13. Emacs carefully copies the old contents to another file, called the
  14. "backup" file, before actually saving.  (This assumes that the variable
  15. `make-backup-files' is non-`nil'.  Backup files are not written if this
  16. variable is `nil'.)  Emacs does not normally make backup files for
  17. files in `/tmp'.
  18.  
  19.    At your option, Emacs can keep either a single backup file or a
  20. series of numbered backup files for each file that you edit.
  21.  
  22.    Emacs makes a backup for a file only the first time the file is saved
  23. from one buffer.  No matter how many times you save a file, its backup
  24. file continues to contain the contents from before the file was visited.
  25. Normally this means that the backup file contains the contents from
  26. before the current editing session; however, if you kill the buffer and
  27. then visit the file again, a new backup file will be made by the next
  28. save.
  29.  
  30. * Menu:
  31.  
  32. * Names: Backup Names.        How backup files are named;
  33.                   choosing single or numbered backup files.
  34. * Deletion: Backup Deletion.    Emacs deletes excess numbered backups.
  35. * Copying: Backup Copying.    Backups can be made by copying or renaming.
  36.  
  37. 
  38. File: emacs,  Node: Backup Names,  Next: Backup Deletion,  Up: Backup
  39.  
  40. Single or Numbered Backups
  41. ..........................
  42.  
  43.    If you choose to have a single backup file (this is the default),
  44. the backup file's name is constructed by appending `~' to the file name
  45. being edited; thus, the backup file for `eval.c' would be `eval.c~'.
  46.  
  47.    If you choose to have a series of numbered backup files, backup file
  48. names are made by appending `.~', the number, and another `~' to the
  49. original file name.  Thus, the backup files of `eval.c' would be called
  50. `eval.c.~1~', `eval.c.~2~', and so on, through names like
  51. `eval.c.~259~' and beyond.
  52.  
  53.    If protection stops you from writing backup files under the usual
  54. names, the backup file is written as `%backup%~' in your home directory.
  55. Only one such file can exist, so only the most recently made such
  56. backup is available.
  57.  
  58.    The choice of single backup or numbered backups is controlled by the
  59. variable `version-control'.  Its possible values are
  60.  
  61. `t'
  62.      Make numbered backups.
  63.  
  64. `nil'
  65.      Make numbered backups for files that have numbered backups already.
  66.      Otherwise, make single backups.
  67.  
  68. `never'
  69.      Do not in any case make numbered backups; always make single
  70.      backups.
  71.  
  72. You can set `version-control' locally in an individual buffer to
  73. control the making of backups for that buffer's file.  For example,
  74. Rmail mode locally sets `version-control' to `never' to make sure that
  75. there is only one backup for an Rmail file.  *Note Locals::.
  76.  
  77.    If you set the environment variable `VERSION_CONTROL', to tell
  78. various GNU utilities what to do with backup files, Emacs also obeys the
  79. environment variable by setting the Lisp variable `version-control'
  80. accordingly at startup.  If the environment variable's value is `t' or
  81. `numbered', then `version-control' becomes `t'; if the value is `nil'
  82. or `existing', then `version-control' becomes `nil'; if it is `never'
  83. or `simple', then `version-control' becomes `never'.
  84.  
  85.    For files under version control (*note Version Control::.), the
  86. variable `vc-make-backup-files' determines whether to make backup
  87. files.  By default, it is `nil', since backup files are redundant when
  88. you store all the previous versions in a version control system.  *Note
  89. Editing with VC::.
  90.  
  91. 
  92. File: emacs,  Node: Backup Deletion,  Next: Backup Copying,  Prev: Backup Names,  Up: Backup
  93.  
  94. Automatic Deletion of Backups
  95. .............................
  96.  
  97.    To prevent unlimited consumption of disk space, Emacs can delete
  98. numbered backup versions automatically.  Generally Emacs keeps the
  99. first few backups and the latest few backups, deleting any in between.
  100. This happens every time a new backup is made.
  101.  
  102.    The two variables `kept-old-versions' and `kept-new-versions'
  103. control this deletion.  Their values are, respectively the number of
  104. oldest (lowest-numbered) backups to keep and the number of newest
  105. (highest-numbered) ones to keep, each time a new backup is made.
  106. Recall that these values are used just after a new backup version is
  107. made; that newly made backup is included in the count in
  108. `kept-new-versions'.  By default, both variables are 2.
  109.  
  110.    If `delete-old-versions' is non-`nil', the excess middle versions
  111. are deleted without a murmur.  If it is `nil', the default, then you
  112. are asked whether the excess middle versions should really be deleted.
  113.  
  114.    Dired's `.' (Period) command can also be used to delete old versions.
  115. *Note Dired Deletion::.
  116.  
  117. 
  118. File: emacs,  Node: Backup Copying,  Prev: Backup Deletion,  Up: Backup
  119.  
  120. Copying vs. Renaming
  121. ....................
  122.  
  123.    Backup files can be made by copying the old file or by renaming it.
  124. This makes a difference when the old file has multiple names.  If the
  125. old file is renamed into the backup file, then the alternate names
  126. become names for the backup file.  If the old file is copied instead,
  127. then the alternate names remain names for the file that you are
  128. editing, and the contents accessed by those names will be the new
  129. contents.
  130.  
  131.    The method of making a backup file may also affect the file's owner
  132. and group.  If copying is used, these do not change.  If renaming is
  133. used, you become the file's owner, and the file's group becomes the
  134. default (different operating systems have different defaults for the
  135. group).
  136.  
  137.    Having the owner change is usually a good idea, because then the
  138. owner always shows who last edited the file.  Also, the owners of the
  139. backups show who produced those versions.  Occasionally there is a file
  140. whose owner should not change; it is a good idea for such files to
  141. contain local variable lists to set `backup-by-copying-when-mismatch'
  142. locally (*note File Variables::.).
  143.  
  144.    The choice of renaming or copying is controlled by three variables.
  145. Renaming is the default choice.  If the variable `backup-by-copying' is
  146. non-`nil', copying is used.  Otherwise, if the variable
  147. `backup-by-copying-when-linked' is non-`nil', then copying is used for
  148. files that have multiple names, but renaming may still used when the
  149. file being edited has only one name.  If the variable
  150. `backup-by-copying-when-mismatch' is non-`nil', then copying is used if
  151. renaming would cause the file's owner or group to change.
  152.  
  153. 
  154. File: emacs,  Node: Interlocking,  Prev: Backup,  Up: Saving
  155.  
  156. Protection against Simultaneous Editing
  157. ---------------------------------------
  158.  
  159.    Simultaneous editing occurs when two users visit the same file, both
  160. make changes, and then both save them.  If nobody were informed that
  161. this was happening, whichever user saved first would later find that his
  162. changes were lost.  On some systems, Emacs notices immediately when the
  163. second user starts to change the file, and issues an immediate warning.
  164.  
  165.    For the sake of systems where that is not possible, and in case
  166. someone else proceeds to change the file despite the warning, Emacs also
  167. checks when the file is saved, and issues a second warning if you are
  168. about to overwrite a file containing another user's changes.  You can
  169. prevent loss of the other user's work by taking the proper corrective
  170. action at that time.
  171.  
  172.    When you make the first modification in an Emacs buffer that is
  173. visiting a file, Emacs records that  the file is "locked" by you.  (It
  174. does this by writing another file in a directory reserved for this
  175. purpose.)  The lock is removed when you save the changes.  The idea is
  176. that the file is locked whenever an Emacs buffer visiting it has
  177. unsaved changes.
  178.  
  179.    If you begin to modify the buffer while the visited file is locked by
  180. someone else, this constitutes a "collision".  When Emacs detects a
  181. collision, it asks you what to do, by calling the Lisp function
  182. `ask-user-about-lock'.  You can redefine this function for the sake of
  183. customization.  The standard definition of this function asks you a
  184. question and accepts three possible answers:
  185.  
  186. `s'
  187.      Steal the lock.  Whoever was already changing the file loses the
  188.      lock, and you gain the lock.
  189.  
  190. `p'
  191.      Proceed.  Go ahead and edit the file despite its being locked by
  192.      someone else.
  193.  
  194. `q'
  195.      Quit.  This causes an error (`file-locked') and the modification
  196.      you were trying to make in the buffer does not actually take place.
  197.  
  198.    Note that locking works on the basis of a file name; if a file has
  199. multiple names, Emacs does not realize that the two names are the same
  200. file and cannot prevent two users from editing it simultaneously under
  201. different names.  However, basing locking on names means that Emacs can
  202. interlock the editing of new files that will not really exist until
  203. they are saved.
  204.  
  205.    Some systems are not configured to allow Emacs to make locks.  On
  206. these systems, Emacs cannot detect trouble in advance, but it still can
  207. detect the collision when you try to save a file and overwrite someone
  208. else's changes.
  209.  
  210.    Every time Emacs saves a buffer, it first checks the
  211. last-modification date of the existing file on disk to verify that it
  212. has not changed since the file was last visited or saved.  If the date
  213. does not match, it implies that changes were made in the file in some
  214. other way, and these changes are about to be lost if Emacs actually
  215. does save.  To prevent this, Emacs prints a warning message and asks
  216. for confirmation before saving.  Occasionally you will know why the
  217. file was changed and know that it does not matter; then you can answer
  218. `yes' and proceed.  Otherwise, you should cancel the save with `C-g'
  219. and investigate the situation.
  220.  
  221.    The first thing you should do when notified that simultaneous editing
  222. has already taken place is to list the directory with `C-u C-x C-d'
  223. (*note Directories::.).  This shows the file's current author.  You
  224. should attempt to contact him to warn him not to continue editing.
  225. Often the next step is to save the contents of your Emacs buffer under a
  226. different name, and use `diff' to compare the two files.
  227.  
  228.    Simultaneous editing checks are also made when you visit with `C-x
  229. C-f' a file that is already visited and when you start to modify a
  230. file.  This is not strictly necessary, but it can cause you to find out
  231. about the collision earlier, when perhaps correction takes less work.
  232.  
  233. 
  234. File: emacs,  Node: Reverting,  Next: Auto Save,  Prev: Saving,  Up: Files
  235.  
  236. Reverting a Buffer
  237. ==================
  238.  
  239.    If you have made extensive changes to a file and then change your
  240. mind about them, you can get rid of them by reading in the previous
  241. version of the file.  To do this, use `M-x revert-buffer', which
  242. operates on the current buffer.  Since reverting a buffer
  243. unintentionally could lose a lot of work, you must confirm this command
  244. with `yes'.
  245.  
  246.    `revert-buffer' keeps point at the same distance (measured in
  247. characters) from the beginning of the file.  If the file was edited only
  248. slightly, you will be at approximately the same piece of text after
  249. reverting as before.  If you have made drastic changes, the same value
  250. of point in the old file may address a totally different piece of text.
  251.  
  252.    Reverting marks the buffer as "not modified" until another change is
  253. made.
  254.  
  255.    Some kinds of buffers whose contents reflect data bases other than
  256. files, such as Dired buffers, can also be reverted.  For them,
  257. reverting means recalculating their contents from the appropriate data
  258. base.  Buffers created randomly with `C-x b' cannot be reverted;
  259. `revert-buffer' reports an error when asked to do so.
  260.  
  261. 
  262. File: emacs,  Node: Auto Save,  Next: File Aliases,  Prev: Reverting,  Up: Files
  263.  
  264. Auto-Saving: Protection Against Disasters
  265. =========================================
  266.  
  267.    Emacs saves all the visited files from time to time (based on
  268. counting your keystrokes) without being asked.  This is called
  269. "auto-saving".  It prevents you from losing more than a limited amount
  270. of work if the system crashes.
  271.  
  272.    When Emacs determines that it is time for auto-saving, each buffer is
  273. considered, and is auto-saved if auto-saving is turned on for it and it
  274. has been changed since the last time it was auto-saved.  The message
  275. `Auto-saving...' is displayed in the echo area during auto-saving, if
  276. any files are actually auto-saved.  Errors occurring during auto-saving
  277. are caught so that they do not interfere with the execution of commands
  278. you have been typing.
  279.  
  280. * Menu:
  281.  
  282. * Files: Auto Save Files.       The file where auto-saved changes are
  283.                                   actually made until you save the file.
  284. * Control: Auto Save Control.   Controlling when and how often to auto-save.
  285. * Recover::                Recovering text from auto-save files.
  286.  
  287. 
  288. File: emacs,  Node: Auto Save Files,  Next: Auto Save Control,  Up: Auto Save
  289.  
  290. Auto-Save Files
  291. ---------------
  292.  
  293.    Auto-saving does not normally save in the files that you visited,
  294. because it can be very undesirable to save a program that is in an
  295. inconsistent state when you have made half of a planned change.
  296. Instead, auto-saving is done in a different file called the "auto-save
  297. file", and the visited file is changed only when you request saving
  298. explicitly (such as with `C-x C-s').
  299.  
  300.    Normally, the auto-save file name is made by appending `#' to the
  301. front and rear of the visited file name.  Thus, a buffer visiting file
  302. `foo.c' is auto-saved in a file `#foo.c#'.  Most buffers that are not
  303. visiting files are auto-saved only if you request it explicitly; when
  304. they are auto-saved, the auto-save file name is made by appending `#%'
  305. to the front and `#' to the rear of buffer name.  For example, the
  306. `*mail*' buffer in which you compose messages to be sent is auto-saved
  307. in a file named `#%*mail*#'.  Auto-save file names are made this way
  308. unless you reprogram parts of Emacs to do something different (the
  309. functions `make-auto-save-file-name' and `auto-save-file-name-p').  The
  310. file name to be used for auto-saving in a buffer is calculated when
  311. auto-saving is turned on in that buffer.
  312.  
  313.    When you delete a substantial part of the text in a large buffer,
  314. auto save turns off temporarily in that buffer.  This is because if you
  315. deleted the text unintentionally, you might find the auto-save file more
  316. useful if it contains the deleted text.  To reenable auto-saving after
  317. this happens, save the buffer with `C-x C-s', or use `C-u 1 M-x
  318. auto-save'.
  319.  
  320.    If you want auto-saving to be done in the visited file, set the
  321. variable `auto-save-visited-file-name' to be non-`nil'.  In this mode,
  322. there is really no difference between auto-saving and explicit saving.
  323.  
  324.    A buffer's auto-save file is deleted when you save the buffer in its
  325. visited file.  To inhibit this, set the variable
  326. `delete-auto-save-files' to `nil'.  Changing the visited file name with
  327. `C-x C-w' or `set-visited-file-name' renames any auto-save file to go
  328. with the new visited name.
  329.  
  330. 
  331. File: emacs,  Node: Auto Save Control,  Next: Recover,  Prev: Auto Save Files,  Up: Auto Save
  332.  
  333. Controlling Auto-Saving
  334. -----------------------
  335.  
  336.    Each time you visit a file, auto-saving is turned on for that file's
  337. buffer if the variable `auto-save-default' is non-`nil' (but not in
  338. batch mode; *note Entering Emacs::.).  The default for this variable is
  339. `t', so auto-saving is the usual practice for file-visiting buffers.
  340. Auto-saving can be turned on or off for any existing buffer with the
  341. command `M-x auto-save-mode'.  Like other minor mode commands, `M-x
  342. auto-save-mode' turns auto-saving on with a positive argument, off with
  343. a zero or negative argument; with no argument, it toggles.
  344.  
  345.    Emacs does auto-saving periodically based on counting how many
  346. characters you have typed since the last time auto-saving was done.
  347. The variable `auto-save-interval' specifies how many characters there
  348. are between auto-saves.  By default, it is 300.
  349.  
  350.    Auto-saving also takes place when you stop typing for a while.  The
  351. variable `auto-save-timeout' says how many seconds Emacs should wait
  352. before it does an auto save (and perhaps also a garbage collection).
  353. (The actual time period is longer if the current buffer is long; this
  354. is a heuristic which aims to keep out of your way when you are editing
  355. long buffers in which auto-save takes an appreciable amount of time.)
  356. Auto-saving during idle periods accomplishes two things: first, it
  357. makes sure all your work is saved if you go away from the terminal for
  358. a while; second, it may avoid some auto-saving while you are actually
  359. typing.
  360.  
  361.    Emacs also does auto-saving whenever it gets a fatal error.  This
  362. includes killing the Emacs job with a shell command such as `kill
  363. %emacs', or disconnecting a phone line or network connection.
  364.  
  365.    You can request an auto-save explicitly with the command `M-x
  366. do-auto-save'.
  367.  
  368. 
  369. File: emacs,  Node: Recover,  Prev: Auto Save Control,  Up: Auto Save
  370.  
  371. Recovering Data from Auto-Saves
  372. -------------------------------
  373.  
  374.    You can use the contents of an auto-save file to recover from a loss
  375. of data with the command `M-x recover-file RET FILE RET'.  This visits
  376. FILE and then (after your confirmation) restores the contents from from
  377. its auto-save file `#FILE#'.  You can then save with `C-x C-s' to put
  378. the recovered text into FILE itself.  For example, to recover file
  379. `foo.c' from its auto-save file `#foo.c#', do:
  380.  
  381.      M-x recover-file RET foo.c RET
  382.      yes RET
  383.      C-x C-s
  384.  
  385.    Before asking for confirmation, `M-x recover-file' displays a
  386. directory listing describing the specified file and the auto-save file,
  387. so you can compare their sizes and dates.  If the auto-save file is
  388. older, `M-x recover-file' does not offer to read it.
  389.  
  390.    If Emacs or the computer crashes, you can recover all the files you
  391. were editing from their auto save files with the command `M-x
  392. recover-session'.  This first shows you a list of recorded interrupted
  393. sessions.  Move point to the one you choose, and type `C-c C-c'.
  394.  
  395.    Then `recover-session' asks about each of the files that were being
  396. edited during that session, asking whether to recover that file.  If
  397. you answer `y', it calls `recover-file', which works in its normal
  398. fashion.  It shows the dates of the original file and its auto-save
  399. file, and asks once again whether to recover that file.
  400.  
  401.    When `recover-session' is done, the files you've chosen to recover
  402. are present in Emacs buffers.  You should then save them.  Only
  403. this--saving them--updates the files themselves.
  404.  
  405.    Interrupted sessions are recorded for later recovery in files named
  406. `~/.saves-PID-HOSTNAME'.  The `~/.saves' portion of these names comes
  407. from the value of `auto-save-list-file-prefix'.  You can arrange to
  408. record sessions in a different place by setting that variable in your
  409. `.emacs' file, but you'll have to redefine `recover-session' as well to
  410. make it look in the new place.  If you set `auto-save-list-file-prefix'
  411. to `nil' in your `.emacs' file, sessions are not recorded for recovery.
  412.  
  413. 
  414. File: emacs,  Node: File Aliases,  Next: Version Control,  Prev: Auto Save,  Up: Files
  415.  
  416. File Name Aliases
  417. =================
  418.  
  419.    Symbolic links and hard links both make it possible for several file
  420. names to refer to the same file.  Hard links are alternate names that
  421. refer directly to the file; all the names are equally valid, and no one
  422. of them is preferred.  By contrast, a symbolic link is a kind of defined
  423. alias: when `foo' is a symbolic link to `bar', you can use either name
  424. to refer to the file, but `bar' is the real name, while `foo' is just
  425. an alias.  More complex cases occur when symbolic links point to
  426. directories.
  427.  
  428.    If you visit two names for the same file, normally Emacs makes two
  429. different buffers, but it warns you about the situation.
  430.  
  431.    If you wish to avoid visiting the same file in two buffers under
  432. different names, set the variable `find-file-existing-other-name' to a
  433. non-`nil' value.  Then `find-file' uses the existing buffer visiting
  434. the file, no matter which of the file's names you specify.
  435.  
  436.    If the variable `find-file-visit-truename' is non-`nil', then the
  437. file name recorded for a buffer is the file's "truename" (made by
  438. replacing all symbolic links with their target names), rather than the
  439. name you specify.  Setting `find-file-visit-truename' also implies the
  440. effect of `find-file-existing-other-name'.
  441.  
  442. 
  443. File: emacs,  Node: Version Control,  Next: Directories,  Prev: File Aliases,  Up: Files
  444.  
  445. Version Control
  446. ===============
  447.  
  448.    "Version control systems" are packages that can record multiple
  449. versions of a source file, usually storing the unchanged parts of the
  450. file just once.  Version control systems also record history information
  451. such as the creation time of each version, who created it, and a
  452. description of what was changed in that version.
  453.  
  454.    The Emacs version control commands work with three version control
  455. systems--RCS, CVS and SCCS.  The GNU project recommends RCS and CVS,
  456. which are free software and available from the Free Software Foundation.
  457.  
  458. * Menu:
  459.  
  460. * Version Systems::             Supported version control back end systems.
  461. * VC Concepts::                 Basic version control information;
  462.                                   checking files in and out.
  463. * Editing with VC::             Commands for editing a file maintained
  464.                                   with version control.
  465. * Log Entries::                 Logging your changes.
  466. * Change Logs and VC::          Generating a change log file from log entries.
  467. * Old Versions::                Examining and comparing old versions.
  468. * Branches::                    Selecting a branch to put your changes in,
  469.                                   and creating a new branch.
  470. * Status in VC::                Commands to view the VC status of files and
  471.                                   look at log entries.
  472. * Renaming and VC::             A command to rename both the source and
  473.                                   master file correctly.
  474. * Snapshots::                   How to make and use snapshots, a set of
  475.                                   file versions that can be treated as a unit.
  476. * Version Headers::             Inserting version control headers into
  477.                                   working files.
  478. * Customizing VC::              Variables to change VC's behavior.
  479.  
  480. 
  481. File: emacs,  Node: Version Systems,  Next: VC Concepts,  Up: Version Control
  482.  
  483. Supported Version Control Systems
  484. ---------------------------------
  485.  
  486.    VC currently works with three different version control systems or
  487. "back ends": RCS, CVS, and SCCS.
  488.  
  489.    RCS is a free version control system that is available from the Free
  490. Software Foundation.  It is perhaps the most mature of the supported
  491. back ends, and the VC commands are conceptually closest to RCS.  Almost
  492. everything you can do with RCS can be done through VC.
  493.  
  494.    CVS is built on top of RCS, and extends the features of RCS, allowing
  495. for more sophisticated release management, and concurrent multi-user
  496. development.  VC supports basic editing operations under CVS, but for
  497. some less common tasks you still need to call CVS from the command line.
  498. Note also that before using CVS you must set up a repository, which is a
  499. subject too complex to treat here.  *Note CVS and VC::.
  500.  
  501.    SCCS is a proprietary but widely used version control system.  In
  502. terms of capabilities, it is the weakest of the the three that VC
  503. supports.  VC compensates for certain features missing in SCCS
  504. (snapshots, for example) by implementing them itself, but some other VC
  505. features, such as multiple branches, are not available with SCCS.  You
  506. should use SCCS only if for some reason you cannot use RCS.
  507.  
  508. 
  509. File: emacs,  Node: VC Concepts,  Next: Editing with VC,  Prev: Version Systems,  Up: Version Control
  510.  
  511. Concepts of Version Control
  512. ---------------------------
  513.  
  514.    When a file is under version control, we also say that it is
  515. "registered" in the version control system.  Each registered file has a
  516. corresponding "master file" which represents the file's present state
  517. plus its change history, so that you can reconstruct from it either the
  518. current version or any specified earlier version.  Usually the master
  519. file also records a "log entry" for each version describing what was
  520. changed in that version.
  521.  
  522.    The file that is maintained under version control is sometimes called
  523. the "work file" corresponding to its master file.
  524.  
  525.    To examine a file, you "check it out".  This extracts a version of
  526. the source file (typically, the most recent) from the master file.  If
  527. you want to edit the file, you must check it out "locked".  Only one
  528. user can do this at a time for any given source file.  (This kind of
  529. locking is completely unrelated to the locking that Emacs uses to detect
  530. simultaneous editing of a file.)
  531.  
  532.    When you are done with your editing, you must "check in" the new
  533. version.  This records the new version in the master file, and unlocks
  534. the source file so that other people can lock it and thus modify it.
  535.  
  536.    Checkin and checkout are the basic operations of version control.
  537. You can do both of them with a single Emacs command: `C-x C-q'
  538. (`vc-toggle-read-only').
  539.  
  540.    There are variants of this basic pattern, though.  CVS, for example,
  541. has no such thing as locking, and therefore you can normally edit files
  542. right away, without having to check them out first.  *Note CVS and VC::.
  543. With RCS, you can optionally select "non-strict locking" for a
  544. particular source file; then you can edit the file in Emacs without
  545. explicitly locking it.
  546.  
  547.    A "snapshot" is a coherent collection of versions of the various
  548. files that make up a program.  *Note Snapshots::.
  549.  
  550. 
  551. File: emacs,  Node: Editing with VC,  Next: Log Entries,  Prev: VC Concepts,  Up: Version Control
  552.  
  553. Editing with Version Control
  554. ----------------------------
  555.  
  556.    These are the commands for editing a file maintained with version
  557. control:
  558.  
  559. `C-x C-q'
  560. `C-x v v'
  561.      Check the visited file in or out.
  562.  
  563. `C-x v u'
  564.      Revert the buffer and the file to the last checked in version.
  565.  
  566. `C-x v c'
  567.      Remove the last-entered change from the master for the visited
  568.      file.  This undoes your last check-in.
  569.  
  570. `C-x v i'
  571.      Register the visited file for version control.
  572.  
  573. (`C-x v' is the prefix key for version control commands; all of these
  574. commands except for `C-x C-q' start with `C-x v'.)
  575.  
  576. * Menu:
  577.  
  578. * Check-Out::                   Checking out a file so you can edit it.
  579. * Check-In::                    After you edit, you check in your changes
  580.                                   to make a new version.
  581. * Version Control Undo::        Canceling changes before or after checkin.
  582. * Registering::                 How to start using version control
  583.                                   for a file.
  584. * VC Mode Line::                Mode line indicates version and lock status.
  585. * CVS and VC::                  Checkout and checkin work differently in CVS.
  586.  
  587. 
  588. File: emacs,  Node: Check-Out,  Next: Check-In,  Up: Editing with VC
  589.  
  590. Check-Out
  591. .........
  592.  
  593.    When you want to modify a file maintained with version control, type
  594. `C-x C-q' (`vc-toggle-read-only').  This "checks out" the file, and
  595. tells RCS or SCCS to lock the file.  This means making the file
  596. writable for you (but not for anyone else).
  597.  
  598.    If you specify a prefix argument (`C-u C-x C-q') for checkout, Emacs
  599. asks you for a version number, and checks out that version *unlocked*.
  600. This lets you move to old versions, or existing branches of the file
  601. (*note Branches::.).  You can then start editing the selected version
  602. by typing `C-x C-q' again.  (If you edit an old version of a file this
  603. way, checking it in again creates a new branch.)
  604.  
  605.    Under CVS, you normally don't need to check out files explicitly.
  606. CVS does not have locking; multiple users can edit their copies of a
  607. file whenever they want.  (If two users make conflicting changes, they
  608. need to reconcile their changes when checking them in.)  We therefore
  609. say that an "implicit" check-out happens when you make the first change
  610. in the file.
  611.  
  612.    CVS has an alternative mode in which explicit check-out is required.
  613. And RCS has an alternative mode called "non-strict locking" in which
  614. explicit check-out is not required.  Selecting these modes is done
  615. outside of VC, but once you have selected them, VC obeys them.  With
  616. RCS, you can select non-strict locking for a particular file using the
  617. `rcs -U' command.  *Note CVS and VC::, for an explanation of how to do
  618. this with CVS.
  619.  
  620. 
  621. File: emacs,  Node: Check-In,  Next: Version Control Undo,  Prev: Check-Out,  Up: Editing with VC
  622.  
  623. Check-In
  624. ........
  625.  
  626.    When you are finished editing the file, type `C-x C-q' again.  When
  627. used on a file that is checked out, this command checks the file in.
  628. But check-in does not start immediately; first, you must enter the "log
  629. entry"--a description of the changes in the new version.  `C-x C-q'
  630. pops up a buffer for you to enter this in.  When you are finished
  631. typing in the log entry, type `C-c C-c' to terminate it; this is when
  632. actual check-in takes place.  *Note Log Entries::.
  633.  
  634.    With RCS and SCCS, a checked-out file is also "locked", which means
  635. it is writable for you, but not for anyone else.  As long as you own
  636. the lock on the file, nobody else can modify it, and nobody can check
  637. in any changes to that particular version.  Checking in your changes
  638. unlocks the file, so that other users can lock it and modify it.
  639.  
  640.    CVS, on the contrary, doesn't have a concept of locking.  The working
  641. files are always modifiable, allowing concurrent development, with
  642. possible conflicts being resolved at check-in time.  *Note CVS and VC::.
  643.  
  644.    To specify the version number for the new version, type `C-u C-x
  645. C-q' to check in a file.  Then Emacs asks you for the new version number
  646. in the minibuffer.  This can be used to create a new "branch" of the
  647. file (*note Branches::.), or to increment the file's major version
  648. number.
  649.  
  650.    It is not impossible to lock a file that someone else has locked.  If
  651. you try to check out a file that is locked, `C-x C-q' asks you whether
  652. you want to "steal the lock."  If you say yes, the file becomes locked
  653. by you, but a message is sent to the person who had formerly locked the
  654. file, to inform him of what has happened.  The mode line indicates that
  655. a file is locked by someone else by displaying the login name of that
  656. person, before the version number.
  657.  
  658. 
  659. File: emacs,  Node: Registering,  Next: VC Mode Line,  Prev: Version Control Undo,  Up: Editing with VC
  660.  
  661. Registering a File for Version Control
  662. ......................................
  663.  
  664. `C-x v i'
  665.      Register the visited file for version control.
  666.  
  667.    You can put any file under version control by simply visiting it, and
  668. then typing `C-x v i' (`vc-register'). After `C-x v i', the file is
  669. unlocked and read-only.  Type `C-x C-q' if you wish to start editing it.
  670.  
  671.    When you register the file, Emacs must choose which version control
  672. system to use for it.  You can specify your choice explicitly by setting
  673. `vc-default-back-end' to `RCS', `CVS' or `SCCS'.  Otherwise, if there
  674. is a subdirectory named `RCS', `SCCS', or `CVS', Emacs uses the
  675. corresponding version control system.  In the absence of any
  676. specification, the default choice is RCS if RCS is installed, otherwise
  677. SCCS.
  678.  
  679.    After registering a file with CVS, you must subsequently commit the
  680. initial version by typing `C-x C-q'.  *Note CVS and VC::.
  681.  
  682.    The initial version number for a newly registered file is 1.1, by
  683. default.  To specify a different number, give `C-x v i' a numeric
  684. argument; then it reads the initial version number using the minibuffer.
  685.  
  686.    If `vc-initial-comment' is non-`nil', `C-x v i' reads an initial
  687. comment (much like a log entry) to describe the purpose of this source
  688. file.
  689.  
  690. 
  691. File: emacs,  Node: Version Control Undo,  Next: Registering,  Prev: Check-In,  Up: Editing with VC
  692.  
  693. Undoing Version Control Actions
  694. ...............................
  695.  
  696. `C-x v u'
  697.      Revert the buffer and the file to the last checked in version.
  698.  
  699. `C-x v c'
  700.      Remove the last-entered change from the master for the visited
  701.      file.  This undoes your last checkin.
  702.  
  703.    If you want to discard your current set of changes and revert to the
  704. last version checked in, use `C-x v u' (`vc-revert-buffer').  This
  705. cancels your last check-out, leaving the file unlocked.  If you want to
  706. make a different set of changes, you must first check the file out
  707. again.  `C-x v u' requires confirmation, unless it sees that you
  708. haven't made any changes since the last checked-in version.
  709.  
  710.    `C-x v u' is also the command to use to unlock a file if you lock it
  711. and then decide not to change it.
  712.  
  713.    You can cancel a change after checking it in, with `C-x v c'
  714. (`vc-cancel-version').  This command discards all record of the most
  715. recent checked in version.  `C-x v c' also offers to revert your work
  716. file and buffer to the previous version (the one that precedes the
  717. version that is deleted).  If you say `no', then VC keeps your changes
  718. in the buffer and locks the file.
  719.  
  720.    The no-revert option is useful when you have checked in a change and
  721. then discover a trivial error in it; you can cancel the erroneous
  722. check-in, fix the error, and check the file in again.
  723.  
  724.    When `C-x v c' does not revert the buffer, it unexpands all version
  725. control headers in the buffer instead (*note Version Headers::.).  This
  726. is because the buffer no longer corresponds to any existing version.
  727. If you check it in again, the checkin process will expand the headers
  728. properly for the new version number.
  729.  
  730.    However, it is impossible to unexpand the RCS `$Log$' header
  731. automatically.  If you use that header feature, you have to unexpand it
  732. by hand--by deleting the entry for the version that you just canceled.
  733.  
  734.    Be careful when invoking `C-x v c', as it is easy to throw away a
  735. lot of work with it.  To help you be careful, this command always
  736. requires confirmation with `yes'.  Note also that this command is
  737. disabled under CVS, because canceling versions is very dangerous and
  738. discouraged with this back end.
  739.  
  740. 
  741. File: emacs,  Node: VC Mode Line,  Next: CVS and VC,  Prev: Registering,  Up: Editing with VC
  742.  
  743. The VC Mode Line
  744. ................
  745.  
  746.    When you visit a file that is under version control, the mode line
  747. indicates the current status of the file: the name of the version
  748. control back end system, the locking state, and the version.
  749.  
  750.    The locking state is displayed as a single character, which can be
  751. either `-' or `:'.  `-' means the file is not locked or not modified by
  752. you.  Once you lock the file, the state indicator changes to `:'.  If
  753. the file is locked by someone else, that user's name appears after the
  754. version number.
  755.  
  756.    For example, `RCS-1.3' means you are looking at RCS version 1.3,
  757. which is not locked.  `RCS:1.3' means that you have locked the file,
  758. and possibly already changed it.  `RCS:jim:1.3' means that the file is
  759. locked by jim.
  760.  
  761. 
  762. File: emacs,  Node: CVS and VC,  Prev: VC Mode Line,  Up: Editing with VC
  763.  
  764. Using VC with CVS
  765. .................
  766.  
  767.    In CVS, files are never locked.  Two users can check out the same
  768. file at the same time; each user has a separate copy and can edit it.
  769. Work files are always writable; once you have one, you need not type a
  770. VC command to start editing the file.  You can edit it at any time.
  771.  
  772.    When using RCS and SCCS, you normally use `C-x C-q' twice for each
  773. change; once before the change, for checkout, and once after, for
  774. checkin.  With CVS, it's different: you normally use `C-x C-q' just
  775. once for each change, to commit the change when it is done.  The work
  776. file remains writable, so you can begin editing again with no special
  777. commands.
  778.  
  779.    One way to understand this is that VC does an "implicit" check-out
  780. when you save the modified file for the first time.  VC indicates this
  781. on the mode line: the status indicator changes from `-' to `:' as soon
  782. as you save a modified version, telling you that you are not in sync
  783. with the repository anymore (*note VC Mode Line::.).  The file stays
  784. "checked out" until you check it back in, even if you kill the buffer
  785. and visit the file again.
  786.  
  787.    If, instead, you would like to use explicit check-out with CVS, set
  788. the `CVSREAD' environment variable to some value.  (It does not matter
  789. what value you use.)  CVS then makes your work files read-only by
  790. default, and VC requires you to check them out explicitly with `C-x
  791. C-q'.  When setting `CVSREAD' for the first time, make sure to check
  792. out all your modules anew, so that the file protections are set
  793. correctly.
  794.  
  795.    VC does not provide a way to check out a working copy of an existing
  796. file in the repository.  You have to use the CVS shell commands to do
  797. that.  Once you have a work file, you can start using VC for that file.
  798.  
  799.    CVS terminology speaks of "committing" a change rather than checking
  800. it in.  But in practical terms they work the same way: Emacs asks you
  801. to type in a log entry, and you finish it with `C-c C-c'.
  802.  
  803.    When you try to commit a change in a file, but someone else has
  804. committed another change in the meanwhile, that creates a "conflict".
  805. VC detects this situation and offers to "merge" your changes and those
  806. of the other user, creating a new local version of the file, which you
  807. can then commit to the repository.  This works smoothly if the changes
  808. are in different parts of the file, although it is wise to check the
  809. resulting file for semantic consistency.
  810.  
  811.    However, if you and the other user changed the same parts of the
  812. file, the conflict cannot be resolved automatically.  In this case, CVS
  813. inserts both variants of the conflicting regions into your working file,
  814. and puts so-called "conflict markers" around them.  They indicate how
  815. the region looks in the respective user's version.  You must resolve
  816. the conflict manually, for example by choosing one of the two variants
  817. and deleting the other one (and the conflict markers).  Then you can
  818. commit the resulting file into the repository.  The example below shows
  819. how a conflict region looks; the file is called `name' and the current
  820. repository version with user B's changes in it is 1.11.
  821.  
  822.      <<<<<<< name
  823.        USER A'S VERSION
  824.      =======
  825.        USER B'S VERSION
  826.      >>>>>>> 1.11
  827.  
  828.    You can turn off use of VC for CVS-managed files by setting the
  829. variable `vc-handle-cvs' to `nil'.  If you do this, Emacs treats these
  830. files as if they were not managed, and the VC commands are not
  831. available for them.  You must do all CVS operations manually.
  832.  
  833. 
  834. File: emacs,  Node: Log Entries,  Next: Change Logs and VC,  Prev: Editing with VC,  Up: Version Control
  835.  
  836. Log Entries
  837. -----------
  838.  
  839.    When you're editing an initial comment or log entry for inclusion in
  840. a master file, finish your entry by typing `C-c C-c'.
  841.  
  842. `C-c C-c'
  843.      Finish the comment edit normally (`vc-finish-logentry').  This
  844.      finishes check-in.
  845.  
  846.    To abort check-in, just *don't* type `C-c C-c' in that buffer.  You
  847. can switch buffers and do other editing.  As long as you don't try to
  848. check in another file, the entry you were editing remains in its
  849. buffer, and you can go back to that buffer at any time to complete the
  850. check-in.
  851.  
  852.    If you change several source files for the same reason, it is often
  853. convenient to specify the same log entry for many of the files.  To do
  854. this, use the history of previous log entries.  The commands `M-n',
  855. `M-p', `M-s' and `M-r' for doing this work just like the minibuffer
  856. history commands (except that these versions are used outside the
  857. minibuffer).
  858.  
  859.    Each time you check in a file, the log entry buffer is put into VC
  860. Log mode, which involves running two hooks: `text-mode-hook' and
  861. `vc-log-mode-hook'.  *Note Hooks::.
  862.  
  863. 
  864. File: emacs,  Node: Change Logs and VC,  Next: Old Versions,  Prev: Log Entries,  Up: Version Control
  865.  
  866. Change Logs and VC
  867. ------------------
  868.  
  869.    If you use RCS for a program and also maintain a change log file for
  870. it (*note Change Log::.), you can generate change log entries
  871. automatically from the version control log entries:
  872.  
  873. `C-x v a'
  874.      Visit the current directory's change log file and create new
  875.      entries for versions checked in since the most recent entry in the
  876.      change log file (`vc-update-change-log').
  877.  
  878.      This command works with RCS only; it does not work with CVS or
  879.      SCCS.
  880.  
  881.    For example, suppose the first line of `ChangeLog' is dated 10 April
  882. 1992, and that the only check-in since then was by Nathaniel Bowditch
  883. to `rcs2log' on 8 May 1992 with log text `Ignore log messages that
  884. start with `#'.'.  Then `C-x v a' visits `ChangeLog' and inserts text
  885. like this:
  886.  
  887.      Fri May  8 21:45:00 1992  Nathaniel Bowditch  <nat@apn.org>
  888.      
  889.              * rcs2log: Ignore log messages that start with `#'.
  890.  
  891. You can then edit the new change log entry further as you wish.
  892.  
  893.    Normally, the log entry for file `foo' is displayed as `* foo: TEXT
  894. OF LOG ENTRY'.  The `:' after `foo' is omitted if the text of the log
  895. entry starts with `(FUNCTIONNAME): '.  For example, if the log entry
  896. for `vc.el' is `(vc-do-command): Check call-process status.', then the
  897. text in `ChangeLog' looks like this:
  898.  
  899.      Wed May  6 10:53:00 1992  Nathaniel Bowditch  <nat@apn.org>
  900.      
  901.              * vc.el (vc-do-command): Check call-process status.
  902.  
  903.    When `C-x v a' adds several change log entries at once, it groups
  904. related log entries together if they all are checked in by the same
  905. author at nearly the same time.  If the log entries for several such
  906. files all have the same text, it coalesces them into a single entry.
  907. For example, suppose the most recent checkins have the following log
  908. entries:
  909.  
  910. * For `vc.texinfo': `Fix expansion typos.'
  911. * For `vc.el': `Don't call expand-file-name.'
  912. * For `vc-hooks.el': `Don't call expand-file-name.'
  913.  
  914. They appear like this in `ChangeLog':
  915.  
  916.      Wed Apr  1 08:57:59 1992  Nathaniel Bowditch  <nat@apn.org>
  917.      
  918.              * vc.texinfo: Fix expansion typos.
  919.      
  920.              * vc.el, vc-hooks.el: Don't call expand-file-name.
  921.  
  922.    Normally, `C-x v a' separates log entries by a blank line, but you
  923. can mark several related log entries to be clumped together (without an
  924. intervening blank line) by starting the text of each related log entry
  925. with a label of the form `{CLUMPNAME} '.  The label itself is not
  926. copied to `ChangeLog'.  For example, suppose the log entries are:
  927.  
  928. * For `vc.texinfo': `{expand} Fix expansion typos.'
  929. * For `vc.el': `{expand} Don't call expand-file-name.'
  930. * For `vc-hooks.el': `{expand} Don't call expand-file-name.'
  931.  
  932. Then the text in `ChangeLog' looks like this:
  933.  
  934.      Wed Apr  1 08:57:59 1992  Nathaniel Bowditch  <nat@apn.org>
  935.      
  936.              * vc.texinfo: Fix expansion typos.
  937.              * vc.el, vc-hooks.el: Don't call expand-file-name.
  938.  
  939.    A log entry whose text begins with `#' is not copied to `ChangeLog'.
  940. For example, if you merely fix some misspellings in comments, you can
  941. log the change with an entry beginning with `#' to avoid putting such
  942. trivia into `ChangeLog'.
  943.  
  944. 
  945. File: emacs,  Node: Old Versions,  Next: Branches,  Prev: Change Logs and VC,  Up: Version Control
  946.  
  947. Examining And Comparing Old Versions
  948. ------------------------------------
  949.  
  950. `C-u C-x C-q VERSION RET'
  951.      Select version VERSION as the current work file version.
  952.  
  953. `C-x v ~ VERSION RET'
  954.      Examine version VERSION of the visited file, in a buffer of its
  955.      own.
  956.  
  957. `C-x v ='
  958.      Compare the current buffer contents with the latest checked-in
  959.      version of the file.
  960.  
  961. `C-u C-x v = FILE RET OLDVERS RET NEWVERS RET'
  962.      Compare the specified two versions of FILE.
  963.  
  964.    There are two ways to work with an old version of a file.  You can
  965. make the old version your current work file, for example if you want to
  966. reproduce a former stage of development, or if you want to create a
  967. branch from the old version (*note Branches::.).  To do this, visit the
  968. file and type `C-u C-x C-q VERSION RET'.  (This works only with RCS.)
  969.  
  970.    If you want only to examine an old version, without changing your
  971. work file, visit the file and then type `C-x v ~ VERSION RET'
  972. (`vc-version-other-window').  This puts the text of version VERSION in
  973. a file named `FILENAME.~VERSION~', and visits it in its own buffer in a
  974. separate window.
  975.  
  976.    To compare two versions of a file, use the command `C-x v ='
  977. (`vc-diff').  Plain `C-x v =' compares the current buffer contents
  978. (saving them in the file if necessary) with the last checked-in version
  979. of the file.  `C-u C-x v =', with a numeric argument, reads a file name
  980. and two version numbers, then compares those versions of the specified
  981. file.
  982.  
  983.    If you supply a directory name instead of the name of a work file,
  984. this command compares the two specified versions of all registered files
  985. in that directory and its subdirectories.  You can also specify a
  986. snapshot name (*note Snapshots::.) instead of one or both version
  987. numbers.
  988.  
  989.    You can specify a checked-in version by its number; an empty input
  990. specifies the current contents of the work file (which may be different
  991. from all the checked-in versions).
  992.  
  993.    This command works by running the `diff' utility, getting the
  994. options from the variable `diff-switches'.  It displays the output in a
  995. special buffer in another window.  Unlike the `M-x diff' command, `C-x
  996. v =' does not try to locate the changes in the old and new versions.
  997. This is because normally one or both versions do not exist as files
  998. when you compare them; they exist only in the records of the master
  999. file.  *Note Comparing Files::, for more information about `M-x diff'.
  1000.  
  1001. 
  1002. File: emacs,  Node: Branches,  Next: Status in VC,  Prev: Old Versions,  Up: Version Control
  1003.  
  1004. Multiple Branches of a File
  1005. ---------------------------
  1006.  
  1007.    One use of version control is to maintain multiple "current"
  1008. versions of a file.  For example, you might have different versions of a
  1009. program in which you are gradually adding various unfinished new
  1010. features.  Each such independent line of development is called a
  1011. "branch".  VC allows you to create branches, and switch between
  1012. existing branches.  Note, however, that branches are supported only with
  1013. RCS.
  1014.  
  1015.    A file's main line of development is usually called the "trunk".
  1016. The versions on the trunk are normally numbered 1.1, 1.2, 1.3, etc.  At
  1017. any such version, you may start an independent branch.  A branch
  1018. starting at version 1.2 would have version number 1.2.1.1.  Consecutive
  1019. versions on this branch would have numbers 1.2.1.2, 1.2.1.3, 1.2.1.4,
  1020. and so on.  If there is a second branch also starting at version 1.2; it
  1021. would consist of versions 1.2.2.1, 1.2.2.2, 1.2.2.3, and so on.
  1022.  
  1023.    If you omit the final component of a version number, that is called a
  1024. "branch number".  It refers to the highest existing version on that
  1025. branch.  The branches in the example above have branch numbers 1.2.1 and
  1026. 1.2.2.
  1027.  
  1028.    A version which is the last in its branch is called a "head" version.
  1029.  
  1030. * Menu:
  1031.  
  1032. * Switching Branches::    How to get to another existing branch.
  1033. * Creating Branches::     How to start a new branch.
  1034. * Multi-User Branching::  Multiple users working at multiple branches
  1035.                             in parallel.
  1036.  
  1037. 
  1038. File: emacs,  Node: Switching Branches,  Next: Creating Branches,  Up: Branches
  1039.  
  1040. Switching between Branches
  1041. ..........................
  1042.  
  1043.    To switch between branches, type `C-u C-x C-q' and specify the
  1044. version number you want to select.  This version is then checked out
  1045. *unlocked* (write-protected), so you can examine it before really
  1046. checking it out.  Switching branches in this way is allowed only when
  1047. the file is not locked.
  1048.  
  1049.    You may omit the minor version number, thus giving only the branch
  1050. number; this takes you to the highest version on the indicated branch.
  1051. If you only type `RET', Emacs goes to the highest version on the trunk.
  1052.  
  1053.    After you have switched to any branch (including the main branch),
  1054. you stay on it for subsequent VC commands, until you explicitly select
  1055. some other branch.
  1056.  
  1057. 
  1058. File: emacs,  Node: Creating Branches,  Next: Multi-User Branching,  Prev: Switching Branches,  Up: Branches
  1059.  
  1060. Creating New Branches
  1061. .....................
  1062.  
  1063.    To create a new branch from a head version (one that is the latest in
  1064. the branch that contains it), first select that version if necessary,
  1065. lock it with `C-x C-q', and make whatever changes you want.  Then, when
  1066. you check in the changes, use `C-u C-x C-q'.  This lets you specify the
  1067. version number for the new version.  You should specify a suitable
  1068. branch number for a branch starting at the current version.  For
  1069. example, if the current version is 2.5, the branch number should be
  1070. 2.5.1, 2.5.2, and so on, depending on the number of existing branches at
  1071. that point.
  1072.  
  1073.    To create a new branch at an older version (one that is no longer the
  1074. head of a branch), first select that version, then lock it with `C-x
  1075. C-q'.  You'll be asked to confirm, when you lock the old version, that
  1076. you really mean to create a new branch--if you say no, you'll be offered
  1077. a chance to lock the latest version instead.
  1078.  
  1079.    Then make your changes and type `C-x C-q' again to check in a new
  1080. version.  This automatically creates a new branch starting from the
  1081. selected version.  You need not specially request a new branch, because
  1082. that's the only way to add a new version at a point that is not the head
  1083. of a branch.
  1084.  
  1085.    After the branch is created, you "stay" on it.  That means that
  1086. subsequent checkouts and checkins create new versions on that branch.
  1087. To leave the branch, you must explicitly select a different version with
  1088. `C-u C-x C-q' for checkout.
  1089.  
  1090.